<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>个人中心</title>
    <link rel="stylesheet" href="/static/layui/css/layui.css" media="all"/>
    <link rel="stylesheet" href="/static/css/frontIndex.css"/>
</head>
<body>
<div class="layui-fluid">
<fieldset class="layui-elem-field layui-field-title">
    <legend>我的个人信息</legend>
</fieldset>
    <div class="layui-fluid">
        <form class="layui-form" style="width: 50%;margin-top: 3%;margin-left: 3%;">
            <div class="layui-form-item">
                <label class="layui-form-label">账号</label>
                <div class="layui-input-block">
                    <input type="text" name="accountid" id="accountid" class="layui-input layui-disabled" value="${userinfo.accountid}" disabled>
                </div>
            </div><br>
            <div class="layui-form-item">
                <label class="layui-form-label">用户名</label>
                <div class="layui-input-block">
                    <input type="text" name="username" required lay-verify="required" placeholder="请输入用户名" autocomplete="off"
                           class="layui-input" value="${userinfo.username}">
                </div>
            </div><br>
            <div class="layui-form-item">
                <label class="layui-form-label">角色</label>
                <div class="layui-input-block">
                    <input type="text" name="role" class="layui-input layui-disabled" value="${userinfo.raRole.role}" disabled>
                </div>
            </div><br>
            <div class="layui-form-item">
                <label class="layui-form-label">密码</label>
                <a id="updatepwbtn" class="layui-btn">修改密码</a>
            </div><br>
            <div class="layui-form-item">
                <label class="layui-form-label">性别</label>
                <div class="layui-input-block" id="radio_sex">
                    <input type="radio" name="sex" value="男" title="男" checked>
                    <input type="radio" name="sex" value="女" title="女" >
                </div>
                <input id="inputsex" type="text" value="${userinfo.sex}" hidden>
            </div><br>
            <div class="layui-form-item">
                <label class="layui-form-label">年龄</label>
                <div class="layui-input-block">
                    <input type="text" name="age" required lay-verify="required" placeholder="请输入年龄" autocomplete="off"
                           class="layui-input" value="${userinfo.age}" >
                </div>
            </div><br>
            <div class="layui-form-item">
                <label class="layui-form-label">电子邮箱</label>
                <div class="layui-input-block">
                    <input type="text" name="mail" required lay-verify="required" placeholder="请输入电子邮箱" autocomplete="off"
                           class="layui-input" value="${userinfo.mail}">
                </div>
            </div><br>
            <div class="layui-form-item">
                <label class="layui-form-label">联系方式</label>
                <div class="layui-input-block">
                    <input type="text" name="phone" required lay-verify="required" placeholder="请输入联系方式" autocomplete="off"
                           class="layui-input" value="${userinfo.phone}">
                </div>
            </div><br>
            <div class="layui-form-item">
                <label class="layui-form-label">详细地址</label>
                <div class="layui-input-block">
                    <input type="text" name="address" required lay-verify="required" placeholder="请输入详细地址" autocomplete="off"
                           class="layui-input" value="${userinfo.address}">
                </div>
            </div><br>
            <div class="layui-form-item" hidden>
                <label class="layui-form-label">头像地址</label>
                <div class="layui-input-block">
                    <input type="text" name="photo" id="photo"  autocomplete="off" class="layui-input" value="${userinfo.photo}">
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-input-block">
                    <button class="layui-btn" lay-submit lay-filter="confirmdata">确认修改个人基本资料</button>
                </div>
            </div>
        </form>
        <img id="personphoto" src="${userinfo.photo}">
        <div id="uploadphoto" >
            <button id="uploadfile" type="button" class="layui-btn" id="test1">上传头像</button>
        </div>
    </div>

    <div class="layui-fluid">
        <div id="layercontent" style="width: 90%;margin-top: 10%;" hidden>
            <div class="layui-form-item">
                <label class="layui-form-label">旧密码</label>
                <div class="layui-input-block">
                    <input type="password" name="oldpassword" id="oldpassword" required lay-verify="required" placeholder="请输入旧密码" autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">新密码</label>
                <div class="layui-input-block">
                    <input type="password" name="newpassword" id="newpassword" required lay-verify="required" placeholder="请输入新密码" autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">确认密码</label>
                <div class="layui-input-block">
                    <input type="password" name="checkpassword" id="checkpassword" required lay-verify="required" placeholder="请再次输入新密码" autocomplete="off" class="layui-input">
                </div>
            </div>
        </div>
    </div>

</div>
<script type="text/javascript" src="/static/layui/layui.js"></script>
<script type="text/javascript" src="/static/js/jquery-3.2.1.min.js"></script>
<script type="text/javascript" src="/static/js/admin/person.js"></script>
</body>
</html>